package org.shoukaiseki.springbootdemowsdlserver.wsdl.service.impl;

import org.shoukaiseki.springbootdemowsdlserver.wsdl.service.PlaceService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * org.shoukaiseki.springbootdemowsdlserver.wsdl.service.impl.PlaceServiceImpl
 * <br>
 *
 * @author shoukaiseki ブログ http://www.shoukaiseki.top/<br> E-メール jiang28555@Gmail.com<br>
 * @date 2022-06-29 16:03:19<br>
 */
@WebService
@Component
public class PlaceServiceImpl implements PlaceService {


    private static final Logger logger= LoggerFactory.getLogger(PlaceServiceImpl.class);


    @Value("${place.name}")
    private String placeName;

    @Value("${place.query-url}")
    private String queryUrl;

    /**
     *
     * @WebService | 放在接口上用于标记为webService服务接口 |
     * targetNamespace | 命名空间 |
     * name | 服务接口的名字，可不写 |
     * @WebMethod | 标记为webService服务的方法 |
     * @WebParam | 标记为webService服务的方法入参 |

     * @param token
     * @param name
     * @return
     */

    @Override
    @WebMethod
    public String queryPlace(@WebParam(targetNamespace = "http://impl.service.wsdl.springbootdemowsdlserver.shoukaiseki.org/", name = "token") String token,
                             @WebParam(targetNamespace = "http://impl.service.wsdl.springbootdemowsdlserver.shoukaiseki.org/", name = "name") String name) {

        logger.debug("token={}",token);
        logger.debug("name={}",name);


        return "token="+token+",name="+name;
    }
}
